﻿/**
 * @file   FITKAbstractMeshingParametr.h
 * @brief 几何网格区域尺寸生成器
 * @author fulipeng (fulipengqd@yeah.net)
 * @date 2024-12-13
 */
#ifndef _FITKABSTRACT_MESHING_PARAMETR_GENERATOR_H___
#define _FITKABSTRACT_MESHING_PARAMETR_GENERATOR_H___

#include "FITKInterfaceMeshGenAPI.h"
#include "FITKGeometryMeshSize.h"
#include "FITKSurfaceMeshingParameter.h"
#include "FITKVolumeMeshingParameter.h"

#include <QObject>
#include <QMetaEnum>
namespace Interface
{
	/**
	 * @brief 面网格划分参数抽象类
	 * @author fulipeng (fulipengqd@yeah.net)
	 * @date 2024-12-13
	 */
	class FITKInterfaceMeshGenAPI FITKAbstractMeshingParameter : public QObject
	{
		Q_OBJECT;

	public:
		/**
		 * @brief Construct a new FITKAbstractMeshingParametr object
		 * @author fulipeng (fulipengqd@yeah.net)
		 * @date 2024-12-13
		 */
		explicit FITKAbstractMeshingParameter() = default;
		/**
		 * @brief Destroy the FITKAbstractMeshingParametr object
		 * @author fulipeng (fulipengqd@yeah.net)
		 * @date 2024-12-13
		 */
		virtual ~FITKAbstractMeshingParameter() override;

		/**
		 * @brief 添加网格划分参数
		 * @return 
		 * @author fulipeng (fulipengqd@yeah.net)
		 * @date 2024-12-23
		 */
		void appendMeshParameter(int partID);

		/**
		 * @brief 移除网格划分参数
		 * @return
		 * @author fulipeng (fulipengqd@yeah.net)
		 * @date 2024-12-23
		 */
		void removeMeshParameter(int partID);

		/**
		 * @brief 获取面网格划分参数
		 * @return 面网格划分参数
		 * @author fulipeng (fulipengqd@yeah.net)
		 * @date 2024-12-17
		 */
		FITKSurfaceMeshingParameter* getSurfaceMeshParameter(int dataObjectID);

		/**
		 * @brief 获取体网格划分参数
		 * @return 体网格划分参数
		 * @author fulipeng (fulipengqd@yeah.net)
		 * @date 2024-12-17
		 */
		FITKVolumeMeshingParameter* getVolumeMeshParameter(int partID);

	protected:
		virtual bool setParameter(QString iName, QVariant iValue, int valueType) = 0;

	protected:

		/**
		 * @brief   面网格划分参数
		 * @author fulipeng (fulipengqd@yeah.net)
		 * @date 2024-12-17
		 */
		QHash<int, FITKSurfaceMeshingParameter*> _sMeshingParameters;

		/**
		 * @brief   体网格划分参数
		 * @author fulipeng (fulipengqd@yeah.net)
		 * @date 2024-12-17
		 */
		QHash<int, FITKVolumeMeshingParameter*> _vMeshingParameters;

	};

}


#endif
